package com.hunktimes.wholesale.vm

import androidx.lifecycle.MutableLiveData
import com.hunktimes.wholesale.base.BaseViewModel
import com.hunktimes.wholesale.extension.launch
import com.hunktimes.wholesale.net.WholeSaleRepository

/**
 * Author: Delete
 * Date: 2020/8/12 11:35
 * Description:
 *
 */
class MeVM : BaseViewModel() {

    val userInfoResult = MutableLiveData<List<String>>()

    /**
     * 首页 三个 类型 的 商品
     */
    fun getHomeData() {
        launch({
            val resp = WholeSaleRepository.getUserInfo()
            val banners = resp.data
            banners?.let {
                userInfoResult.value = it
            }
        })
    }
}